package J250404;

import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;

public class Test3 {
    public static void main(String[] args) throws InterruptedException {
        ReentrantLock locker = new ReentrantLock(true); // 公平锁
        locker.lock(); // 加锁
        locker.unlock(); // 解锁
        Condition lock1 = locker.newCondition(); // 指定唤醒
        Condition lock2 = locker.newCondition(); // 指定唤醒
        lock1.await();
        lock2.await();
    }
}
